package org.TCC_NOVO.client.visual;

import com.google.gwt.user.client.ui.Image;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.Window;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
import com.gwtext.client.widgets.layout.ColumnLayout;
import com.gwtext.client.widgets.layout.ColumnLayoutData;

public class SobreForm extends Window{

    Panel panelPrin;

    public SobreForm() {
        init();
        this.setModal(true);
    }

    private void init(){
        panelPrin = getPanelCentral();
        this.add(panelPrin);
        this.setTitle("Sobre");
    }

    private Panel getPanelCentral(){
        Image img = new Image("Images/logo_113x113.png");
        
        Panel panel = new Panel();
        panel.setLayout(new ColumnLayout());
        panel.setSize(405, 135);
        panel.setBorder(false);
        panel.setPaddings(1);
        panel.add(img, new ColumnLayoutData(0.30));

        Panel panelHtml = new Panel();
        panelHtml.setHeight(133);
        panelHtml.setHtml("<center>Sistema Gerenciador de Objetos de Aprendizagem</center>\n"+
                           "<hr>\n" +
                           "<p>Versão 1.2</p>\n"+
                           "<p>                                        </p>\n"+
                           "<p>Software Desenvolvido Para Conclusão do Curso "+
                           "de Ciência da Computação da Universidade Regional de Blumenau.</p>\n"+
                           "José Carlos Knaul - Fone: (47) 91440072");
        panel.add(panelHtml, new ColumnLayoutData(0.70));

        Button btnFechar = new Button("Fechar");        
        btnFechar.addListener(new ButtonListenerAdapter(){
            @Override
            public void onClick(Button button, EventObject e){
                hide();
            }
        });

        this.addButton(btnFechar);

        return panel;
    }


}
